# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:       王景渊  
# Name:         5.ajaxdata.json
# Description:
# Author:       dell
# Date:         2019/3/2
#-------------------------------------------------------------------------------
s=input("请输入一个字符串：")
while True:
    a=input("请输入要统计的字符串：")
    if a=='end':
        break
    i=0
    count=0
    while i<len(s):
        index=s.find(a,i)
        if s.find(a,i)==-1:
            break
        count+=1
        i=index+len(a)
    print('{}在{}中出现了{}次'.format(a,s,count))

